home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / README < prev    next >
Encoding:
Text File  |  1997-01-19  |  5.8 KB  |  168 lines

  1. Building the source tree in either DOS or Unix is nearly identical.
  2.  
  3. There ARE a few prerequisites, though...
  4.     DOS:    The DJGPP compiler - Borland is no longer supported
  5.         The DJGPP GNU make (might work with others)
  6.  
  7.     Unix:    TCL (tclsh)
  8.         GCC compiler (probably works with others)
  9.         GNU make (might work with others)
  10.         Complete header files (for Linux, this means that the
  11.            Kernel sources need to be installed)
  12.  
  13. The actual compile is as easy as 1-2-3.........
  14.  
  15.  
  16. 1) Set up for proper makefile...
  17.  
  18.     DOS:    premake.bat
  19.         (Sets up for proper makefile, and creates dummy make.inc and
  20.          depend files)
  21.  
  22.     Unix:    premake
  23.         (Sets up for proper makefile, and runs build-make.inc)
  24.  
  25.     Other functions may be added to the premake scripts at a later time.
  26.  
  27.  
  28. 2) [Optional step] Site-specific configuration
  29.  
  30.     This customization should NOT include editing the Makefile.
  31.     Instead, all customizations should be placed in a file
  32.     named 'make.inc', which will be included within the Makefile's
  33.     processing, and commands in make.inc will be treated the same
  34.     as if they were in the Makefile. This way ALL changes specific
  35.     to your site are in make.inc, and will not have to be RE-DONE
  36.     when you upgrade to later releases of TNOS.
  37.  
  38.     Edit the make.inc to your needs. Anything that you WOULD change
  39.     in the Makefile, instead override it in make.inc by including it
  40.     in make.inc.
  41.  
  42.     For example, if you wish to use a different directory for installing
  43.     TNOS other than the default of '/nos', you could add a new NOSDIR
  44.         (and NOSDIRCMD, for MSDOS) line in make.inc.
  45.  
  46.     Please consult the Makefile for what things you COULD change in
  47.     make.inc, what values are valid, and what affect certain changes
  48.     might have on other items. Consider the Makefile as the reference
  49.     for make.inc changes.
  50.  
  51.     All changes/additions to the make.inc file should be made NOW, before
  52.     moving to the next step.
  53.  
  54.  
  55. 3) Make it....
  56.  
  57.     make doeverything
  58.  
  59. Can't make it any easier!
  60.  
  61.  
  62. NOTE: the 'make' utility MAY be named something different than 'make' on
  63. your system, depending on the compiler, etc. For instance, some BSD users
  64. have GNU's make named 'gmake'. I can't help you here, it should be
  65. named 'make' ;-)
  66.  
  67.  
  68. The compiles SHOULD be clear of errors and warnings, except for two in
  69. forth.c, if you have the FORTH compile flag set. These warnings are
  70. harmless, and will ALWAYS occur if FORTH is being defined.
  71.  
  72.  
  73. -------------------------------------------------------------------------
  74.  
  75. There are some special notes below for BSD/OS compilation.
  76.  
  77. [author's note: Some of this is obsolete, but it retained at this time.
  78.  There is a 'make.inc-BSDI' file, which SHOULD set your environment up
  79.  correctly, without needing to edit the makefile.]
  80.  
  81. -------------------------------------------------------------------------
  82.  
  83.         Notes for BSD/OS implementation
  84.  
  85. This is to be regarded as a test implementation - some minor
  86. problems, possibly related to the odd compiler warning or two -
  87. are present.  It is based upon BSD/OS 2.0 with patches; earlier
  88. versions have not been tested.  It is stable i.e. has not crashed
  89. (yet), but still needs to be hammered.
  90.  
  91. * It is possible that some of my changes are the same as those done
  92.   by Kirk Davis VE6KIK, especially since I viewed his source, but
  93.   I declare that they were developed independently.  I hereby
  94.   acknowledge Kirk for his assistance in getting my port working
  95.   in the first place.
  96.  
  97. * I'm still not happy with the UUCP locking - needs further work
  98.   wrt UID and GID (and I'm not enthusiastic about a root-owned
  99.   program rampaging around my system - this is my production box)
  100.   - currently it is merely setgid-dialer to access the serial ports.
  101.   Note that UUCP locking is not the same as Linux.  I'll probably
  102.   end up creating a "nos" user or something, so it's firewalled.
  103.  
  104. * Some changes need to be made to "makefile.unx" - see later.
  105.  
  106. * I thoroughly recommend the "Electric Fence" malloc debugging
  107.   package by Bruce Perens; it enabled me to find a lingering problem
  108.   with SIGSEGVs, which turned out to be an incorrect line in
  109.   domain.txt (an errant SOA line, to be precise).  As with bugs
  110.   of this nature, it didn't crash right away, but instead clobbered
  111.   something else...  (No, I didn't fix the getline() bug.)
  112.  
  113.   Be aware that Electric Fence DOES slow down the system, and use
  114.   significantly MORE virtual memory, so it should be used only when
  115.   hunting down problems, not in day-to-day usage.
  116.  
  117.  
  118. OK, here is what you have to do to "makefile.unx" to see how I
  119. made the BSD/OS version:
  120.  
  121.  
  122.   1) No support for ELF. You need:
  123.  
  124.      #USEELF = 1
  125.      USEELF =
  126.      #MAKEELF = 1
  127.      MAKEELF =
  128.  
  129.   2) Static linking (LTYPE = -static) is default, but won't hurt.
  130.  
  131.   3) You might want to use "gcc2" instead of the default (whichever
  132.      it is).
  133.  
  134.   4) The "INSTALL" is different; BSD/OS has protection for the serial
  135.      ports.  This needs more work wrt uid/gid, cus I'm paranoid...
  136.      I make it setgid to "dialer" at the moment, and spawn it from my
  137.      own UID; a later mod will have it running under its own UID.  I
  138.      also changed the UUCP directory to have GID "dialer".
  139.  
  140.      Old: INSTALL= install -c
  141.      New: INSTALL= install -c -g dialer -m 2755
  142.  
  143.   5) BSD/OS needs IS_LITTLE_ENDIAN, USE_SETSTACK, BSD_RANDOM.
  144.  
  145.   6) Also SETSTACK= setsp.o
  146.  
  147.   7) BSD/OS doesn't come with NCURSES - get 1.8.5, until 1.9.x stabilises.
  148.      You also need:
  149.  
  150.      ICURSES = -I/usr/local/include/ncurses
  151.      LCURSES = -lncurses
  152.  
  153.   8) Debugging is different:
  154.  
  155.      DEBUG =  -g
  156.      DBGLIB = # -lefence
  157.  
  158.   9) You might also want to turn off optimising whilst debugging:
  159.  
  160.      CFLAGS = $(LTYPE) -DUNIX $(DEBUG) $(PATCHES) $(WARNINGS) $(ICURSES) $(VERS)
  161.  
  162.  10) Send abuse if this doesn't work.
  163.  
  164. -- Dave Horsfall  VK2KFU  dave@esi.com.au
  165.    (dave@vk2kfu.ampr.org won't work just yet)
  166.  
  167.  
  168.